<?php

class Users_Form_Userpassword extends Zend_Form {

    public function init() {
        $this->setMethod('post');

        //old password
        $old = new Zend_Form_Element_Password('old');
        $old->setLabel('Password')
                ->addValidator('StringLength', false, array(6))
                ->setOptions(array('placeholder' => 'Enter Old Password'))
                ->setRequired(true);

        //new password 1
        $new1 = new Zend_Form_Element_Password('new1');
        $new1->setLabel('New Password')
                ->addValidator('StringLength', false, array(6))
                ->setOptions(array('placeholder' => 'Enter New Password'))
                ->setRequired(true);

        //new password confirm
        $new2 = new Zend_Form_Element_Password('new2');
        $new2->setLabel('New Password Confirm')
                ->addValidator('StringLength', false, array(6))
                ->setOptions(array('placeholder' => 'Confirm Password'))
                ->setRequired(true);

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Change Password')
                ->setAttrib('class', 'btn btn-success');


        $this->addElements(array($old, $new1, $new2, $submit));
    }

}

